
class person{
    public String name;
    public int age;
    public static String classRoom = "301";

    public person(String name,int age){
        this.name = name;
        this.age = age;
        System.out.println("person()...");
    }

    public person(){
        //this.name = "zhangSan";
        //this.age = 12;
        this("zhangsan",20);
        System.out.println("this->person()....");
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public void eat(){
        System.out.println(this.name+" 吃饭");
    }

    public void show(){
        //this.eat();
        System.out.println("姓名："+this.name+" ,年龄："+this.age);
    }
}

public class Test {
    public static void main(String[] args) {
        person p1 = new person("zhangsan",10);


        System.out.println(person.classRoom);
    }
}

































